<template>
	<view :style="themeColor">
		<view class="page">
			<view
				class="flex flex-direction flex-wrap align-stretch justify-center benben-position-layout flex CancelAccount_flex_0" :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-stretch justify-between CancelAccount_fd0_0'>
					<view class='flex flex-wrap align-center CancelAccount_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  CancelAccount_fd0_0_c0_c0'>&#xe794;</text>
					</view>
					<view class='flex flex-wrap align-center'>
						<text class='CancelAccount_fd0_0_c1_c0'>注销账号</text>
					</view>
					<view class='flex align-center justify-end CancelAccount_fd0_0_c2'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<view class="loading_css" v-if="isShow">
				<u-loading size="36" color="#F35D2A"></u-loading>
				<view>加载中</view>
			</view>

			<!---注销账号协议flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch CancelAccount_flex_1" v-else>
				<u-parse class='CancelAccount_fd1_0' :html="content">
				</u-parse>
				<button class='flex-sub CancelAccount_fd1_1' @tap.stop="application">填写注销申请</button>
			</view>

			<!---注销账号协议flex布局结束-->

		</view>
		<!-- <view style="height: 138rpx;"></view> -->
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},


		data() {
			return {
				"dataMessage": {
					"aid": "",
					"name": "",
					"thumb_img": "",
					"content": "",
					"introduce": ""
				},
				"status": -1,
				"content": "",
				"isShow": true,
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			this.postDetection();
			this.getZhuxiao();
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			// 检测是否提交账号注销  global.API_VERSION+'5cc3f28296cf0'
			postDetection() {
				this.$api.post(global.API_VERSION + '63aab23b1d240', {

				}).then(res => {
					if (res.data.code == 1) {
						this.status = res.data.data.status;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			// 注销账号文案  63a6ac771882e
			getZhuxiao() {
				this.$api.post(global.API_VERSION + '63a6ac771882e', {
					aid: 3
				}).then(res => {
					this.isShow = false;
					if (res.data.code == 1) {
						this.content = res.data.data.content;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			application() {
				if (this.status == -1) {
					uni.navigateTo({
						url: '/pages/xitongs/logOutReason/logOutReason'
					})
				} else {
					uni.redirectTo({
						url: '/pages/xitongs/logOutSubmit/logOutSubmit?type=1'
					})
				}
			},
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background-color: #FFFFFF;
	}

	.CancelAccount_flex_0 {
		width: 750rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-color: #FFFFFF;
	}

	.CancelAccount_fd0_0_c2 {
		padding: 0rpx 0rpx 0rpx 0rpx;
		width: 100rpx;
	}

	.CancelAccount_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
		line-height: 50rpx;
	}

	.CancelAccount_fd0_0_c0_c0 {
		font-size: 36rpx;
		font-weight: 400;
		color: #333;
	}

	.CancelAccount_fd0_0_c0 {
		width: 100rpx;
	}

	.CancelAccount_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
	}

	.CancelAccount_flex_1 {
		line-height: 56rpx;
		font-size: 28rpx;
		color: #333;
		padding: 32rpx 32rpx 138rpx;
	}

	.CancelAccount_fd1_1 {
		background: #F45656;
		font-size: 32rpx;
		color: #FFFFFF;
		height: 88rpx;
		line-height: 88rpx;
		font-weight: 500;
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		margin: 0rpx 32rpx 0rpx 32rpx;
		position: fixed;
		left: 0rpx;
		bottom: calc(40rpx + var(--window-bottom));
		width: 686rpx;
	}
</style>